//
//  STAnimationLoadingController.swift
//  iPhone
//
//  Created by Toj on 8/9/23.
//

import UIKit

// MARK: - 懒加载(属性), 变量, 初始化init
class STAnimationLoadingController: UIViewController {
    
}

// MARK: - 生命周期
extension STAnimationLoadingController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupMakeInitialize()
        setupMakeAddSubviews()
    }
}

// MARK: - 点击事件/ 通知事件回调
@objc private extension STAnimationLoadingController {
    
}

// MARK: - 子类可重写方法/ objc事件
@objc extension STAnimationLoadingController {
    
}

// MARK: - Public
extension STAnimationLoadingController {
    
    func loadDataRequest() {
        view.hud2.show2()
        print("-->toj: loadDataRequest: show")
        DispatchQueue.main.asyncAfter(deadline: .now()+2) {
            //self.view.hud.hide()
            print("-->toj: loadDataRequest: hide")
            self.loadDataVodRequest()
        }
    }
    
    func loadDataVodRequest() {
        view.hud2.show2()
        print("-->toj: loadDataVodRequest: show")
//        DispatchQueue.main.asyncAfter(deadline: .now()+2) {
//            self.view.hud.hide()
//            print("-->toj: loadDataRequest: hide")
//        }
    }
}

// MARK: - Private
private extension STAnimationLoadingController {
    
}

// MARK: - 初始化设置
private extension STAnimationLoadingController {
    
    func setupMakeAddSubviews() {
    }
    
    func setupMakeInitialize() {
        view.backgroundColor = .random
    }
}
